import { POST, GET} from "@/utils/index";
import type {IAddBanner, IEditBanner} from "@/mytype";
 
/* 获取轮播图的数据 */
export const getBannerApi = () => GET("/banner/list");


/* 添加轮播图数据 */
export const addBannerApi = (data:IAddBanner) => POST("/banner/add",data);


/* 更新访问状态 */
export const editBannerApi = (data:IEditBanner) => POST("/banner/updateFlag", data);

/* 删除全部轮播图数据 */
export const removeBannerApi = () => GET("/banner/removeAll");

/* 删除单挑轮播图数据 */
export const removeBannerByIdApi = (bannerid: string) => GET("/banner/delete",  {bannerid} );